{block name="main"}

<?php

$confirmAttr = "";
if($confirmText){
    $confirmAttr = ' data-confirm='. $confirmText ;
}


$iconElem = "";
if($icon){
    $iconElem = '<i class="'. $icon .'"></i>';
}

?>

{if $btnType=='a'}
<a onclick=clickBtn(this) {$confirmAttr} data-href="{$url}" data-id="{$dataId}" data-referer="{$referer}"  href="javascript:" class="{$class}">
    {$iconElem|raw}{$label}
</a>
{elseif $btnType=='btn' /}
<a onclick=clickBtn(this) {$confirmAttr} data-href="{$url}" data-id="{$dataId}" data-referer="{$referer}"  href="javascript:" class="layui-btn {$class}">
    {$iconElem|raw}{$label}
</a>
{elseif $btnType=='button' /}
<button onclick=clickBtn(this) {$confirmAttr} data-href="{$url}" data-id="{$dataId}" data-referer="{$referer}"  type="button" class="layui-btn {$class}">
    {$iconElem|raw}{$label}
</button>
{elseif $btnType=='submit' /}
<button onclick=clickBtn(this) {$confirmAttr} lay-submit lay-filter="easy_form" data-id="{$dataId}" data-referer="{$referer}" type="submit" class="layui-btn {$class}">
    {$iconElem|raw}{$label}
</button>
{/if}

{/block}


{block name="style"}{/block}
{block name="js"}{/block}
